<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>鼠标移入下划线展开</title>
<style type="text/css">
#underline{
    width: 200px;
    height: 50px;
    background: #ddd;
    margin: 20px;
	transition: all .8s;
    position: relative;
}

#underline:after{
    content: "";
    width: 0;
    height: 1px;
    background: blue;
    position: absolute;
    top: 100%;
    left: 50%;
    transition: all .8s;
}

#underline:hover:after{
   left: 0%;
   width: 100%;
}
#underline:hover
{
	opacity:0.5;
}
.linear{
            width:100%;
            height:2px;
            background: linear-gradient( 
            to right, 
            rgba(0,0,0,0) 0%, 
            rgba(0,0,0,0) 10%, 
            rgba(35,198,200,0.3) 20%, 
            rgba(35,198,200,0.4) 30%, 
            rgba(35,198,200,0.5) 40%, 
            rgba(35,198,200,0.8) 50%,
            rgba(35,198,200,0.5) 60%, 
            rgba(35,198,200,0.4) 70%, 
            rgba(35,198,200,0.3) 80%, 
            rgba(0,0,0,0) 90%,
            rgba(0,0,0,0) 100%)
        } 
</style>

</head>

<body>

    <div id="underline"></div>
	<div class="linear"></div>
	https://www.sucaihuo.com/js/3772.html
</body>

</html> 